home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Atari Compendium
/
The Atari Compendium (Toad Computers) (1994).iso
/
files
/
umich
/
sound
/
players
/
digistuf.arc
/
DIGIVEC
/
DIGIVEC.DOC
next >
Wrap
Text File
|
1992-08-20
|
9KB
|
232 lines
Digivec
Copyright (C) 1991, 1992
By David Baggett
--------------------------------------------------------------------------------
User Contract
This program is FREE. You may distribute it at will, provided you
1) do not charge any money for it,
2) distribute it WITH the documentation, and
3) do not change the program or documentation in ANY WAY.
--------------------------------------------------------------------------------
Introduction
------------
"My ST was so boring before I got Digivec!"
"Programming just isn't the same without it."
"I just wouldn't know what to do if someone took away my Digivec!"
You'll agree with these happy customers once you too try the exciting new
shareware utility that's taking the ST world by storm! It's Digivec, and
once you install it on your system, you won't know how you ever lived
without it.
Got your attention? Good. Okay, listen up. Digivec lets you install
digitized sounds to be played when various system events occur. Like
bus errors. Illegal instruction traps. Or line A calls. Even...
<gasp!> GEM critical errors.
General Usage
-------------
Put digivec.prg in your AUTO folder. Then create a file called
digivec.inf with a standard ASCII text editor and put it in the root
directory of your boot partition (e.g., if your AUTO folder is C:\AUTO\,
put digivec.inf in C:\).
In digivec.inf you specify which sounds will be installed, and what events
will trigger them. Each entry starts with a sample file name, enclosed
in square brackets, followed by the sample playback speed, in Hertz,
followed by a list of system vectors which will trigger the sound. Here's
an example digivec.inf file:
[d:\usr\sounds\buserror.snd] 11000 $8 $C
This file tells Digivec to load the sample named d:\usr\sounds\buserror.snd
and to play it at 11000 Hz whenever vectors 8 (hex) and C (hex) are jumped
through (in this case, any time either a bus error or address error occur).
Increasing the number 11000 will make the sound play faster; decreasing
it will make the sound play slower.
The digivec.inf file can contain as many of these entries as you want;
the only limitation is that all the samples have to fit in memory at once.
Note that file names MUST be enclosed in square brackets.
Specifying an Alternate D/A Device
----------------------------------
Digivec can be configured to play its samples through other D/A devices.
Currently, the Hippo/Navarone and ST Replay digitizers are supported. The
STe's (and TT's, and Falcon's) 8-bit D/A is also supported, with either the
DMA or the MFP for timing. (If you use the DMA for timing, you can only play
at certain sample rates, so sounds may sound too fast or slow. On the other
hand, if you use the MFP for timing you can play stereo samples at any rate
but the sound quality isn't quite as good.)
Other digitizers will be supported if people send me info on them.
To use an alternate D/A device, put one of the following keywords
in curly brackets somewhere in your digivec.inf file:
hippo replay dma mfp
For example, a digivec.inf containing
{dma}
[d:\usr\sounds\buserror.snd] 11000 $8
[d:\usr\sounds\youlose.snd] 11000 $C
will cause Digivec to play the all sounds through the DMA sound device, using
the DMA for timing. (This won't work on machines that don't have DMA sound
capabilities, of course.)
Note that the normal ST keyclick will still be masked, even if
you don't use the speaker as the D/A device.
Different Kinds of Samples
--------------------------
Unless you tell it otherwise, Digivec assumes your sounds are unsigned
8-bit mono samples. You can use stereo and/or unsigned samples with Digivec
too, by putting one of the following keywords in brackets after the filename:
stereo signed
For example, a digivec.inf containing
[d:\usr\sounds\lossage.snd] {stereo} 11000 $C
will make Digivec interpret lossage.snd as stero data instead of mono.
(Stereo sounds will play on mono devices; the channels are just mixed
together.)
Similarly the line
[d:\usr\sounds\lossage.snd] {signed} 11000 $C
tells Digivec that lossage.snd has signed 8-bit samples instead
of unsigned samples. Some digitizing software saves sounds in this
format instead of the usual unsigned format. If you're not sure what
you've got, a general rule of thumb is that if a sound sounds very noisy
you should try it as signed.
The Vectors
-----------
You can specify the system vectors either in hexadecimal (with leading $)
or decimal (no leading $). Interesting vectors for triggering sounds
include (but are not limited to):
Hex Decimal Description
--- ------- -----------
$8 8 Bus Error
$C 12 Address Error
$10 16 Illegal Instruction
$14 20 Division by Zero
$20 32 Privilege Violation
$28 40 Line A Emulator
$2C 44 Line F Emulator
$404 1028 Critical Error
$408 1032 Process Termination
$476 1142 Drive read/write
The first 5 vectors deal with failures caused (typically) by software
bugs. These are the things that cause the ST to put bombs on the
screen. But it's so much more fun to have the ST say "Just what do
you think you're doing, Dave?" when a bus error occurs. (Especially
if your name is Dave and you crash the machine a lot...)
The Line A and Line F emulators are typically used to call system
functions. (Line A is used for drawing functions; Line F is used in a very
few programs for pulling off bizarre hacks and/or for floating point).
Triggering sounds with these is not terribly useful unless you're a
programmer-type and want to see just what a given application is up to.
(It's also neat to install a sound at Line A and then run NEOchrome.)
GEM uses the critcal error vector when various things confuse it. The
most common of these is trying to read or write with no disk in the drive.
The process termination vector will trigger a sound whenever any program
exits. This can get extremely annoying after a while. Trust me. It's
really fun to install this one on a machine when the owner isn't looking.
If you miss your Atari 800, with it's "boop boop boop" disk access,
you can trigger a sound with the disk read/write vector. Another good
one to surprise your friends with.
Command Line Usage
------------------
In previous versions of Digivec, invoking the program from the
desktop or command line was tricky. Those problems have been fixed.
To call Digivec from the desktop, rename it digivec.ttp and double
click on it. To run it from a command shell, type
digivec
and press return.
Note that when you run Digivec from the desktop or a command shell,
it looks for digivec.inf in the current working directory.
Technical Information
---------------------
Digivec works by installing a new exception handler for each vector
specified in digivec.inf. Each new handler just plays the appropriate
sound then jumps through the old vector. This should not adversely affect
the system in any way, except in cases where timing is critical. (So
don't trigger sounds with the horizontal blank interrupt!)
Minor problems are caused by the fact that when GEM loads (after AUTO
folder programs are finished), it obliterates the critical error vector and
the process termination vector and installs its own. To get around this,
Digivec waits for GEM to finish loading before it actually installs any
vectors. The method Digivec uses to see if GEM has finished loading
is a bit, ah, undocumented (I think), so I'd be interested to know if
it doesn't work on certain versions of TOS. (How's that for confidence?)
Caveats
-------
Digivec will replace any vector in the system. It does not check to make
sure the vectors you specify are reasonable. This means that you could
theoretically replace some vector in the system that no one else has thought
of replacing, w